<!-- #layout name=blank -->
<div class="page-header">
    <h1 class="title">KScripts</h1>
</div>
<div data-bind="component: { name: 'kb-breadcrumb', params:[{
    name: 'SITES'
},{
    name: 'DASHBOARD'
},{
    name: Kooboo.text.common.Scripts
}]}"></div>
<div class="navbar navbar-default">
    <div class="container-fluid">
        <a data-bind="attr: { href: kscriptCreateUrl }" class="btn green navbar-btn">Create KScript</a>
        <a data-bind="visible: showDeleteBtn, click: onDelete" class="btn red navbar-btn">Delete</a>
        <a href="KScript/Documentation" target="_blank" class="btn btn-default navbar-btn pull-right">Documentation</a>
        <a href="KScript/Debugger" target="_blank" class="btn btn-default navbar-btn pull-right">Debugger</a>
    </div>
</div>
<ul class="nav nav-tabs" data-bind="foreach:types">
    <li data-bind="css: { 'active' : $data.value === $parent.curType() }">
        <a href="javascript:;" data-bind="text:$data.displayName ,click: $parent.fetchDataByType.bind(this, $data.value)"></a>
    </li>
</ul>
<div data-bind="component: { name: 'kb-table', params: tableData }"></div>
<div data-bind="component: { name: 'kb-relation-modal' }"></div>
<script>
    (function() {
        Kooboo.loadJS([
            "/_Admin/Scripts/kooboo/Guid.js",
            "/_Admin/Scripts/components/kbTable.js",
            "/_Admin/Scripts/components/kbRelationModal.js",
            "/_Admin/Scripts/components/kbBreadcrumb.js",
            "/_Admin/Scripts/tableModel.js"
        ])
    })()
</script>
<script src="/_Admin/View/Development/KScripts.js"></script>